Release 10.1A: OpenEdge Development:
Web Services
Defining a request header handler
The main function of a request header handler is to build a SOAP
<Header>element appropriate for the operation. You can do this by creating a SOAP header object and associating with it the required number of SOAP header entries. The handler has anOUTPUTparameter (hSOAPHeader) that you can use to pass the SOAP header that you have built to OpenEdge to insert into the outgoing SOAP message. Any changes you make in the handler to the SOAP header object or its constituent SOAP header-entryref objects are integrated into the SOAP message when the handler completes execution. Thus, if the SOAP header that you return in this procedure contains SOAP header entries, OpenEdge sends out the SOAP message containing a corresponding header element. If you do not set the SOAP header objectOUTPUTparameter (hSOAPHeader), OpenEdge does not include a header in the outgoing SOAP message.If you create a SOAP header in the handler, with potentially multiple SOAP header entries, you are responsible for cleaning up the memory that is used for it. As an aid for deleting this object, and its memory, you can set the
Caution: Do not explicitly delete the header object within the context of the request header handler (before it completes). If you do this, OpenEdge never gets the header to include in the SOAP request message.lDeleteOnDoneparameter for output. Setting this parameter toTRUE, directs OpenEdge to delete the SOAP header object after OpenEdge has copied the object's contents to the outgoing message. Otherwise, your application must manage the lifetime of this object and determine when the object gets destroyed.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |